package com.eaoa.uc.dictionary.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.eaoa.base.EABaseAction;
import com.eaoa.query.pub.PubDditemQuery;

/**
 * DDictionary ManageSearch Expand
 * @author zhenglun.zhou
 *
 */
public class DDictionaryManageSearchExpend extends EABaseAction{

	protected ActionForward doWork(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response){
		
		String ddnostr =request.getParameter("ddno");
		
		Long ddno = Long.valueOf(ddnostr);
		
		request.setAttribute("ddno",ddnostr);
		
		PubDditemQuery dditemQuery = new PubDditemQuery();
		dditemQuery.fetchPubDatadictionary();
		dditemQuery.setFetchParent();
		dditemQuery.setDdno(ddno);
		dditemQuery.setIslock("N");
		dditemQuery.setAscOrderBy("itemorder");
		dditemQuery.execute();
		
		request.setAttribute("results", dditemQuery.getResults());

		return mapping.findForward("success");		
	}
}